<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>编辑权限</title>

</head>
<body>
<div class="easyui-panel" style="padding:5px;height: 300px;">
    <ul id="module" class="easyui-tree" checkbox="true">
        <li>
            <span>角色权限</span>
            <ul>
                <c:forEach items="${root}" var="m1">
                    <li>
                        <span id="${m1.moduleId}">${m1.moduleName}</span>
                        <ul>
                            <c:forEach items="${m1.moduleList2}" var="m2">
                                <li data-options="state:'closed'">
                                    <span id="${m2.moduleId}">${m2.moduleName}</span>
                                    <ul>
                                        <c:forEach items="${m2.moduleList2}" var="m3">
                                            <c:set var="falg" value="true" />
                                            <c:if test="${charmoduleList.size()!=0}">
                                                <c:forEach items="${charmoduleList}" var="cm">
                                                    <c:if test="${cm.moduleId==m3.moduleId}">
                                                        <li data-options="checked:true" id="${m3.moduleId}">
                                                            <span>${m3.moduleName}</span>
                                                        </li>
                                                        <c:set var="falg" value="false" />
                                                    </c:if>
                                                </c:forEach>
                                                <c:if test="${falg}">
                                                    <li data-options="checked:false" id="${m3.moduleId}">
                                                        <span>${m3.moduleName}</span>
                                                    </li>
                                                </c:if>

                                            </c:if>
                                            <c:if test="${charmoduleList.size()==0}">
                                                <li data-options="checked:false" id="${m3.moduleId}">
                                                    <span>${m3.moduleName}</span>
                                                </li>
                                            </c:if>
                                        </c:forEach>

                                    </ul>
                                </li>
                            </c:forEach>
                        </ul>
                    </li>
                </c:forEach>
            </ul>
        </li>
    </ul>
</div>
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'"
   onclick="addModule(${characterId});">保存</a>

</body>
</html>
